package com.magenta.maxoptra.gis;

import java.util.EnumSet;

/*
* Project: MaxOptRA v1.1
* User: Ivan Usalko
* Date: 23.01.2009 15:01:05
*
* Copyright (c) 1999-2009 Magenta Corporation Ltd. All Rights Reserved.
* Magenta Technology proprietary and confidential.
* Use is subject to license terms.
*/
/**
 * Enumeration GeoInfoRequestType.
 */
public enum GeoInfoRequestType {
    FASTEST_ROUTE, SHORTEST_ROUTE, SITES_LIST;

    public static GeoInfoRequestType fromOrdinal(int ordinal) {
        for (GeoInfoRequestType t : EnumSet.allOf(GeoInfoRequestType.class)) {
            if (t.ordinal() == ordinal) {
                return t;
            }
        }
        throw new IllegalStateException(String.format("Ordinal %d for enum %s not found!", ordinal, GeoInfoRequestType.class));
    }
}
